#!/bin/bash

cvt=`cvt 2560 1440 60`
#echo ${cvt:5:${#cvt}}
idx=`echo $cvt|awk '{printf("%d\n",match($0,"Modeline"))}'`
#echo -e "idx:$idx \n"
modeline=${cvt:$idx+7}
echo $modeline
out=`xrandr --newmode $modeline`
echo $?
echo "xrandr --newmode $modeline"
out=`xrandr --addmode Virtual1 ${modeline:1:17}`
out=`xrandr --output Virtual1 --mode ${modeline:1:17}`

#cmd="-a rc*"
#echo $cmd
#cmdfull="ls $cmd"
#echo $cmdfull
#out=`$cmdfull`
#echo "$out"
